<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<%@ include file="/WEB-INF/page/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta charset="utf-8">
	<title>会员列表</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport"
		  content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
	<meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="${ctx }/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${ctx }/css/font_eolqem241z66flxr.css"
		  media="all" />
	<link rel="stylesheet" href="${ctx }/css/list.css" media="all" />
	<script>
        var ctx = "${ctx}";
	</script>
</head>
<body class="childrenBody">
<blockquote class="layui-elem-quote news_search">
	<form class="layui-form">
		<div>
			<div class="layui-inline">
				<div class="layui-input-inline">
					<input type="text" id="nickname" value="" placeholder="请输入昵称"
						   class="layui-input search_input">
				</div>
				<div class="layui-input-inline layui-form">
					<select name="member" class="" id="member">
						<option value="-1">请选择会员级别</option>
						<option value="0">非会员</option>
						<option value="1">一级会员</option>
						<option value="2">二级会员</option>
						<option value="3">三级会员</option>
					</select>
				</div>
				<div class="layui-input-inline layui-form">
					<select name="status" class="" id="status">
						<option value="-1">请选择账户状态</option>
						<option value="未激活">未激活</option>
						<option value="正常">正常</option>
						<option value="禁用">禁用</option>
					</select>
				</div>
				<div class="layui-inline">
					<input type="text" id="createTimeStart"
						   class="layui-input userName" name="createATimeStart"
						   placeholder="注册时间(开始)" value="">
				</div>
				<div class="layui-inline">
					<input type="text" id="createTimeEnd" class="layui-input userName"
						   name="createTimeEnd" placeholder="注册时间(结束)" value="">
				</div>
				<a class="layui-btn search_btn" lay-submit="" data-type="search"
				   lay-filter="search">查询</a>
			</div>
		</div>
		<div style="margin-top: 1%">

			<shiro:hasPermission name="member:member:save">
				<div class="layui-inline">
					<a class="layui-btn layui-btn-normal userAdd_btn">添加用户</a>
				</div>
			</shiro:hasPermission>
			<shiro:hasPermission name="member:member:delete">
				<div class="layui-inline">
					<a class="layui-btn layui-btn-danger batchDel">批量删除</a>
				</div>
			</shiro:hasPermission>
			<div class="layui-inline">（支持模糊查询）</div>
		</div>
	</form>
</blockquote>

<div class="layui-form">
	<table class="layui-table" lay-data="{ url:'${ctx}/member/list', method:'post',  page:true, id:'listTable'}" lay-filter="list">
	  <thead>
	    <tr>
	       <th lay-data="{type:'checkbox', fixed: 'left'}"></th>
		   <th lay-data="{field:'id',width:100}">ID</th>
		   <th lay-data="{field:'name',width:180}">登录名</th>
		   <th lay-data="{field:'email',width:180}">邮箱</th>
		   <%--<th lay-data="{field:'password'}"></th>--%>
		   <th lay-data="{field:'mobile',width:120}">电话</th>
		   <%--<th lay-data="{field:'header'}">用户头像</th>--%>
		   <%--<th lay-data="{field:'shareImage'}"></th>--%>
		   <%--<th lay-data="{field:'scale'}"></th>--%>
		   <th lay-data="{field:'nickname',width:120}">昵称</th>
		   <%--<th lay-data="{field:'openid'}">openid</th>--%>
		   <th lay-data="{field:'level',width:120}">用户角色</th>
		   <th lay-data="{field:'status',templet:'#statusTpl',width:120}">账户状态</th>
		   <%--<th lay-data="{field:'parentId'}">会员等级</th>--%>
		   <th lay-data="{field:'member',templet:'#memberTpl',width:120}">是否会员</th>
		   <%--<th lay-data="{field:'memberBuyTime'}"></th>--%>
		   <%--<th lay-data="{field:'money'}">剩余佣金</th>--%>
		   <%--<th lay-data="{field:'moneyAll'}">总佣金</th>--%>
		   <%--<th lay-data="{field:'rememberToken'}"></th>--%>
		   <%--<th lay-data="{field:'createdAt'}"></th>--%>
		   <%--<th lay-data="{field:'updatedAt'}"></th>--%>
			<th lay-data="{fixed: 'right', align:'center', toolbar: '#bar',width:150}">操作</th>
	    </tr>
	  </thead>
	</table>
</div>
<script type="text/javascript" src="${ctx }/layui/layui.js"></script>
<script type="text/javascript" src="${ctx }/page/member/users.js"></script>
<script type="text/html" id="bar">
	<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">禁用</a>
</script>
<script type="text/html" id="memberTpl">
	{{#  if(d.member === 0){ }}
	<span style="color: #F581B1;">非会员</span>
	{{#  } else if(d.member === 1){ }}
	一级会员
	{{#  } else if(d.member === 2){ }}
	二级会员
	{{#  } else if(d.member === 3){ }}
	三级会员
	{{#  } else{ }}
	未填写
	{{#  } }}
</script>
<script type="text/html" id="statusTpl">
	{{#  if(d.status === '未激活'){ }}
	<span style="color: #FFB800;">未激活</span>
	{{#  } else if(d.status === '正常'){ }}
	<span style="color: #01AAED;">正常</span>
	{{#  } else{ }}
	<span style="color: #FF5722;">禁用</span>
	{{#  } }}
</script>
	 

</body>
</html>

 